home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Communications / IBTip / Source / Fdset.h < prev    next >
Encoding:
Text File  |  1995-06-12  |  729 b   |  20 lines

  1. #import <sys/types.h>
  2. #import <objc/Object.h>
  3.  
  4. @interface Fdset:Object
  5. {
  6.   fd_set fds;        // holds the file descriptors this set will wait on
  7.   fd_set ready_fds;  // holds only those file descriptors which are ready for reading
  8.   int nfds;          // the largest fd in the set plus 1
  9. }
  10.  
  11. + new;
  12. - addfd:(int)thisfd;
  13. - (BOOL) isfdReady:(int)thisfd; // returns YES if given descriptor is ready
  14. - (int) waitOnInputForever;  // returns number of file descriptors which are ready
  15. - (int) waitOnInputFor:(int)seconds;  //waits no more than number of seconds
  16. - (int) waitOnInputFor:(int)seconds :(int)microseconds;  // for fractional timeouts
  17. - (int) getReadyfd;  //returns one of the ready file descriptors, marks it unready
  18.  
  19. @end
  20.